import request from '@/utils/request'
/**
 *
 * @param query
 */
export function roles(query) {
  return request({
    url: '/api/roles',
    method: 'GET',
    params: query
  })
}

/**
 * 新增角色
 * @param data
 */
export function addRoles(data) {
  return request({
    method: 'POST',
    url: '/api/roles',
    data
  })
}
/**
 * 改变角色
 * @param id
 * @param status
 */
export function editRole(data) {
  return request({
    method: 'PUT',
    url: '/api/roles/' + data.id,
    data
  })
}
/**
 * 删除
 * @param id
 */
export function delRole(id) {
  return request({
    method: 'DELETE',
    url: '/api/roles/' + id,
    params: {}
  })
}
